package com.tsing.cli.system.service;

import cn.hutool.http.useragent.UserAgent;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tsing.cli.system.entity.LogEntity;
import com.tsing.cli.common.vo.PageResultVO;
import com.tsing.cli.system.vo.req.LogPageReqVO;
import com.tsing.cli.system.vo.resp.LogPageRespVO;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.springframework.scheduling.annotation.Async;

import java.util.List;

/**
 * <p>
 * 操作日志表 服务类
 * </p>
 *
 * @author TheTsing
 */
public interface ILogService extends IService<LogEntity> {

    @Async
    void save(String username, String ip, UserAgent userAgent, long requestTime, ProceedingJoinPoint joinPoint);

    @Async
    void save(String username, String ip, UserAgent userAgent, long requestTime, JoinPoint joinPoint, Throwable e);

    void deleteLog(List<String> reqVO);

    PageResultVO<LogPageRespVO> logPage(LogPageReqVO reqVO);

}
